import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'

const routes: RouteRecordRaw[] = [
  {
    path: '/',
    redirect: '/home',
  },
  //   首页导航
  {
    path: '/home',
    name: 'Home',
    component: () => import('@/views/home.vue'),
  },
  //     瀑布流模块
  {
    path: '/waterfall',
    children: [
      {
        path: '',
        name: 'Waterfall',
        component: () => import('@/views/waterfall/index.vue'),
      },
    ],
  },
]

const router = createRouter({
  history: createWebHistory(import.meta.env.VITE_APP_ROUTE_URL),
  routes,
})

export default router
